Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collector exporter #552

Merged
merged 28 commits into from
Dec 4, 2019
Merged

Conversation

obecny
Copy link
Member

@obecny obecny commented Nov 20, 2019

Which problem is this PR solving?

  1. Fixes Add OpenTelemetry Collector exporter for web #499
  2. Fixes Add OpenTelemetry Collector exporter for Node.js #502

Short description of the changes

It adds new CollectorExporter for web and node. It will export spans either from web or node to opentelemetry-collector using the opencensus receiver. There is one docker compose file inside examples/basic-tracer-node/docker.

@codecov-io
Copy link

codecov-io commented Nov 20, 2019

Codecov Report

Merging #552 into master will decrease coverage by 0.21%.
The diff coverage is 69.26%.

@@            Coverage Diff             @@
##           master     #552      +/-   ##
==========================================
- Coverage   90.16%   89.94%   -0.22%     
==========================================
  Files         146      168      +22     
  Lines        7390     8238     +848     
  Branches      631      739     +108     
==========================================
+ Hits         6663     7410     +747     
- Misses        727      828     +101
Impacted Files Coverage Δ
...-exporter-collector/src/platform/node/sendSpans.ts 0% <0%> (ø)
...metry-exporter-collector/scripts/version-update.js 0% <0%> (ø)
...kages/opentelemetry-core/scripts/version-update.js 0% <0%> (ø)
...y-exporter-collector/test/common/transform.test.ts 0% <0%> (ø)
packages/opentelemetry-core/src/common/time.ts 95.38% <100%> (+0.46%) ⬆️
...ckages/opentelemetry-core/test/common/time.test.ts 100% <100%> (ø) ⬆️
...es/opentelemetry-exporter-collector/src/version.ts 100% <100%> (ø)
...y-exporter-collector/test/browser/index-webpack.ts 100% <100%> (ø)
packages/opentelemetry-core/src/common/version.ts 100% <100%> (ø)
...ages/opentelemetry-exporter-collector/src/types.ts 100% <100%> (ø)
... and 44 more

@obecny
Copy link
Member Author

obecny commented Nov 20, 2019

cc @draffensperger

Copy link
Member

@mayurkale22 mayurkale22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great 💯, added few minor comments in the first pass. I will spend some time today to review the rest of the conversation stuff.

examples/basic-tracer-node/README.md Outdated Show resolved Hide resolved
examples/basic-tracer-node/README.md Outdated Show resolved Hide resolved
packages/opentelemetry-exporter-collector/README.md Outdated Show resolved Hide resolved
Copy link
Member

@mayurkale22 mayurkale22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addded a few more comments.

packages/opentelemetry-exporter-collector/src/util.ts Outdated Show resolved Hide resolved
packages/opentelemetry-exporter-collector/src/types.ts Outdated Show resolved Hide resolved
packages/opentelemetry-exporter-collector/src/util.ts Outdated Show resolved Hide resolved
packages/opentelemetry-exporter-collector/src/util.ts Outdated Show resolved Hide resolved
packages/opentelemetry-exporter-collector/src/util.ts Outdated Show resolved Hide resolved
packages/opentelemetry-exporter-collector/src/types.ts Outdated Show resolved Hide resolved
packages/opentelemetry-exporter-collector/src/util.ts Outdated Show resolved Hide resolved
packages/opentelemetry-exporter-collector/src/util.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@draffensperger draffensperger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool! Have some comments but awesome to see this coming together.

packages/opentelemetry-core/src/common/time.ts Outdated Show resolved Hide resolved
packages/opentelemetry-exporter-collector/src/transform.ts Outdated Show resolved Hide resolved
packages/opentelemetry-exporter-collector/src/transform.ts Outdated Show resolved Hide resolved
annotation.attributes = attributes;
}

// const messageEvent: MessageEvent;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we open a tracking issue for us to add message events? @mayurkale22 / @bg451 is that in the spec?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK we can use event.attributes to assign the MessageEventType (RECEIVED or SEND) and uncompressedSize and compressedSize bytes instead of adding dedicated api for message event. Maybe you should open an issue to define semantic conversions for all of these attributes.

packages/opentelemetry-exporter-collector/src/transform.ts Outdated Show resolved Hide resolved
annotation.attributes = attributes;
}

// const messageEvent: MessageEvent;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK we can use event.attributes to assign the MessageEventType (RECEIVED or SEND) and uncompressedSize and compressedSize bytes instead of adding dedicated api for message event. Maybe you should open an issue to define semantic conversions for all of these attributes.

packages/opentelemetry-exporter-collector/src/version.ts Outdated Show resolved Hide resolved
Copy link
Member

@bg451 bg451 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work @obecny!

Copy link
Member

@mayurkale22 mayurkale22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, added a few minor comments. Great work! 💯

@mayurkale22 mayurkale22 added the Merge:LGTM This PR is ready to be merged by a Maintainer (has enough valid approvals, successful build, etc.) label Dec 1, 2019
@mayurkale22
Copy link
Member

@open-telemetry/javascript-approvers Please review when you get a chance.

Copy link
Member

@vmarchaud vmarchaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@mayurkale22 mayurkale22 merged commit b58ad10 into open-telemetry:master Dec 4, 2019
@obecny obecny deleted the collector-exporter branch February 2, 2021 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Merge:LGTM This PR is ready to be merged by a Maintainer (has enough valid approvals, successful build, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add OpenTelemetry Collector exporter for Node.js Add OpenTelemetry Collector exporter for web
8 participants